package com.zjpavt.client.page.basepage;

import com.zjpavt.client.page.abstractpage.AbstractMultiPage;
import com.zjpavt.client.page.intefacepage.BasePage;
import com.zjpavt.client.page.intefacepage.OwnerPage;

/**
 * 固定数量的多页
 * @author zyc
 */
public class FixedMultiPage extends AbstractMultiPage implements OwnerPage {
    /**
     * 页面的固定尺寸
     */
    private int pageSize;

    /**
     * 持有者对象
     */
    private BasePage ownerPage;

    public FixedMultiPage(int pageSize, BasePage basePage,int pageNum) {
        super(0);
        this.pageSize = pageSize;
        this.ownerPage = basePage;
    }

    @Override
    public int getPageSize() {
        return pageSize;
    }

    @Override
    public BasePage getOwnerPage() {
        return ownerPage;
    }

    @Override
    public int getPageNum() {
        return getOwnerPage().getPageNum();
    }

    @Override
    public void refreshPage() {
        this.ownerPage.refreshPage();
    }
}
